home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 27.zip / BS1 part 27 / MontageHD_d1.adf / Install-Montage < prev    next >
Text File  |  1993-08-14  |  14KB  |  470 lines

  1. ; Montage Installer Utility
  2. ;
  3. ; For Montage release 1.0 from InnoVision Technology
  4. ;
  5. ; (Last updated: Vincent Law 8/10/93)
  6.  
  7. (set @user-level 2)
  8.  
  9. (
  10.    ; Which OS are we under?
  11.    (set osver (/ (getversion) 65536))
  12.  
  13.    ; Ask where to install it...
  14. ;   (set @default-dest
  15. ;      (askdir
  16. ;         (prompt "Select or create the directory where\n"
  17. ;                 "you would like to install Montage.  \n")
  18. ;         (help "Montage and all necessary files will be installed\n"
  19. ;               "in the your selected directory.   You may wish to\n"
  20. ;               "create a new directory for Montage by using the  \n"
  21. ;               "'Make New Drawer' gadget.                        \n")
  22. ;         (default "DH0:Toaster")
  23. ;      )
  24. ;   )
  25.  
  26.    (makedir "RAM:ENV")
  27.    (makeassign "ENV" "RAM:ENV")
  28.    (run "Montage1:check_where_toaster_is")
  29. ;   (set @default-dest (getenv "TOASTER_DIR"))
  30.    (set default_dir (getenv "TOASTER_DIR"))
  31.    (if (<> @ioerr 0)
  32.       (abort "ERROR: Please install Video Toaster Software\n"
  33.              "       before installing Montage!           \n")
  34.    )
  35.  
  36. ;   (message
  37. ;      "Video Toaster installation has been found on\n" @default-dest "\n"
  38. ;      "\nSelect PROCEED to begin Montage Installation.\n"
  39. ;      (help "\n\n   Click PROCEED to install Montage onto\n"
  40. ;            "   " @default-dest "\n\n"
  41. ;            "   Click CANCEL to exit without installing.\n"
  42. ;      )
  43. ;   )
  44.  
  45.    (set SelectDefault
  46.       (askbool
  47.          (prompt "Video Toaster installation has been found on\n"
  48.                  default_dir "\n"
  49.                  "\nSelect PROCEED to begin Montage Installation.\n"
  50.                  "If you want to install Montage elsewhere,    \n"
  51.                  "select CHANGE PATH.                          \n")
  52.          (help "\n\n   Click PROCEED to install Montage onto\n"
  53.                "   " default_dir "\n\n"
  54.                "   Click CHANGE PATH if you want to install Montage elsewhere.\n"
  55.          )
  56.          (choices "Proceed" "Change Path")
  57.          (default 1)
  58.       )
  59.    )
  60.  
  61.    (if SelectDefault
  62.       (
  63.          (set @default-dest default_dir)
  64.          (set Error_code 0)
  65.       )
  66.       (set Error_code 127)
  67.    )
  68.  
  69.    (while (<> Error_code 0)
  70.       (
  71.          (set @default-dest
  72.             (askdir
  73.                (prompt "Video Toaster installation has been found on \n"
  74.                        default_dir "\n"
  75.                        "Click PROCEED to install Montage here or type \n"
  76.                        "in your preferred directory and press RETURN. \n"
  77.                        "Click SHOW DRIVES to look at available drives.\n")
  78.                (help "   This is the default directory where Montage\n"
  79.                      "   for the Video Toaster will be installed.   \n")
  80.                (default default_dir)
  81.             )
  82.          )
  83.          (execute "delete ENV:TOASTER_DIR")
  84.          (run "Montage1:check_where_toaster_is " @default-dest)
  85.          (set toaster_dir (getenv "TOASTER_DIR"))
  86.          (if (= toaster_dir "")
  87.             (
  88.                (message
  89.                   "ERROR\n\n"
  90.                   "Toaster program is not found in " @default-dest "\n"
  91.                )
  92.                (set Error_code 255)
  93.             )
  94.             (set Error_code 0)
  95.          )
  96.       )
  97.    )
  98.  
  99.    (if (= (exists (tackon @default-dest "Montage!")) 0)
  100.       (makedir (tackon @default-dest "Montage!"))
  101.    )
  102.  
  103.    (if (= (exists (tackon @default-dest "Montage!/MTSEQ")) 0)
  104.       (makedir (tackon @default-dest "Montage!/MTSEQ"))
  105.    )
  106.  
  107.    (if (= (exists (tackon @default-dest "Montage!/MTPIX")) 0)
  108.       (makedir (tackon @default-dest "Montage!/MTPIX"))
  109.    )
  110.  
  111.    (if (= (exists (tackon @default-dest "Montage!/MTFONTS")) 0)
  112.       (makedir (tackon @default-dest "Montage!/MTFONTS"))
  113.    )
  114.  
  115.    (if (= (exists (tackon @default-dest "Montage!/MTDATA")) 0)
  116.       (makedir (tackon @default-dest "Montage!/MTDATA"))
  117.    )
  118.  
  119. ;   (set seq_dir
  120. ;      (askdir
  121. ;         (prompt "Enter the name of default SEQUENCE directory:\n")
  122. ;         (help "This is the directory where the sequences will be saved.\n")
  123. ;         (default (tackon @default-dest "Montage!/MTSEQ"))
  124. ;      )
  125. ;   )
  126.  
  127.    (set iff_dir
  128.       (askdir
  129.          (prompt "Enter the name of your preferred directory\n"
  130.                  "for loading 24-bit IFF picture files:     \n")
  131.          (help "   This is the default directory where   \n"
  132.                "   IFF pictures will be loaded and saved.\n")
  133.          (default (tackon @default-dest "Montage!/MTPIX"))
  134.       )
  135.    )
  136.  
  137.    (set framestore_dir
  138.       (askdir
  139.          (prompt "Enter the name of default FRAMESTORE directory:\n")
  140.          (help "This is the directory where the framestore files will be saved.\n")
  141. ;         (default (tackon @default-dest "/Framestore"))
  142.          (default (getenv "FS_DIR"))
  143.       )
  144.    )
  145.  
  146. ;   (set ascii_dir
  147. ;      (askdir
  148. ;         (prompt "Enter the name of default ASCII directory:\n")
  149. ;         (help "This is the directory where the ascii files will be saved.\n")
  150. ;         (default (tackon @default-dest "Montage!"))
  151. ;      )
  152. ;   )
  153.  
  154. ;   (set montagefonts_dir
  155. ;      (askdir
  156. ;         (prompt "Enter the name of default MONTAGE FONTS directory:\n")
  157. ;         (help "This is the directory where the montage fonts will be\n"
  158. ;               "looked for during the execution of Montage.          \n")
  159. ;         (default (tackon @default-dest "Montage!/MTFONTS"))
  160. ;      )
  161. ;   )
  162.  
  163. ;   (set toasterfonts_dir
  164. ;      (askdir
  165. ;         (prompt "Enter the name of default TOASTER FONTS directory:\n")
  166. ;         (help "This is the directory where the toaster fonts will be\n"
  167. ;               "looked for during the execution of Montage.          \n")
  168. ;         (default (tackon @default-dest "ToasterFonts"))
  169. ;      )
  170. ;   )
  171.  
  172. ;   (set amigafonts_dir
  173. ;      (askdir
  174. ;         (prompt "Enter the name of default AMIGA FONTS directory:\n")
  175. ;         (help "This is the directory where the amiga fonts will be\n"
  176. ;               "looked for during the execution of Montage.        \n")
  177. ;         (default "fonts:")
  178. ;      )
  179. ;   )
  180.  
  181.    (makeassign "Montage" (tackon @default-dest "Montage!"))
  182.    (makeassign "MTDATA" (tackon @default-dest "Montage!/MTDATA"))
  183.    (makeassign "MTSEQ" (tackon @default-dest "Montage!/MTSEQ"))
  184.    (makeassign "MTFONTS" (tackon @default-dest "Montage!/MTFONTS"))
  185.    (makeassign "MTPIX" (tackon @default-dest "Montage!/MTPIX"))
  186.  
  187.    (startup "Montage"
  188.       (prompt "Updating user-startup with necessary Montage assigns.\n\n"
  189.               "Select PROCEED now.\n")
  190.       (help @startup-help)
  191.       (command "Assign Montage: " (tackon @default-dest "Montage!\n"))
  192.       (command "Assign MTDATA: " (tackon @default-dest "Montage!/MTDATA\n"))
  193.       (command "Assign MTSEQ: " (tackon @default-dest "Montage!/MTSEQ\n"))
  194.       (command "Assign MTFONTS: " (tackon @default-dest "Montage!/MTFONTS\n"))
  195.       (command "Assign MTPIX: " (tackon @default-dest "Montage!/MTPIX\n"))
  196.    )
  197.  
  198.    (onerror
  199.       (message
  200.          "Cannot update startup sequence.                     \n"
  201.          "You will need to add the following command manually:\n"
  202.          "'Assign Montage: " (tackon @default-dest 'Montage!') "'\n"
  203.          "'Assign MTDATA: " (tackon @default-dest 'Montage!/MTDATA') "'\n"
  204.          "'Assign MTSEQ: " (tackon @default-dest 'Montage!/MTSEQ') "'\n"
  205.          "'Assign MTFONTS: " (tackon @default-dest 'Montage!/MTFONTS') "'\n"
  206.          "'Assign MTPIX: " (tackon @default-dest 'Montage!/MTPIX') "'\n")
  207.    )
  208.  
  209.    ;----------------------------------------------------------
  210.    ; Prompt for Disk 1.
  211.  
  212.    (if (= (exists "Montage1:") 2)
  213.       (askdisk
  214.          (prompt "Please insert Montage Program Disk 1:")
  215.          (help "")
  216.          (dest "Montage1")
  217.       )
  218.    )
  219.  
  220.    (copyfiles
  221.       (prompt "Creating Montage Assign file")
  222.       (help @copyfiles-help)
  223.       (source "Montage1:Assign_file")
  224.       (dest (tackon @default-dest "Montage!"))
  225.    )
  226. ;   (run "make_assign_file " @default-dest " " seq_dir " " iff_dir " " ascii_dir " " montagefonts_dir " " toasterfonts_dir " " amigafonts_dir " " framestore_dir)
  227.    (run "Montage1:make_assign_file " @default-dest " " iff_dir framestore_dir)
  228.  
  229.    (onerror
  230.       (message
  231.          "Montage installation is not complete. Do you want to quit?\n"
  232.       )
  233.    )
  234.  
  235.    (working "Installing Montage Utility Files...")
  236.  
  237.    (copyfiles
  238.       (prompt "")
  239.       (help @copyfiles-help)
  240.       (source "Montage1:data_files")
  241.       (dest (tackon @default-dest "Montage!/MTDATA"))
  242.       (all)
  243.    )
  244.  
  245.    (copyfiles
  246.       (prompt "")
  247.       (help @copyfiles-help)
  248.       (source "Montage1:RESET_MONTAGE")
  249.       (dest (tackon @default-dest "Montage!"))
  250.    )
  251.  
  252.    ;----------------------------------------------------------
  253.    ; Prompt for Disk 2.
  254.  
  255.    (askdisk
  256.       (prompt "Please insert Montage Program Disk 2:")
  257.       (help "")
  258.       (dest "Montage2")
  259.    )
  260.  
  261.    (working "Installing Montage Executables...")
  262.  
  263.    (copyfiles
  264.       (prompt "")
  265.       (help @copyfiles-help)
  266.       (source "Montage2:")
  267.       (pattern "Montage#?")
  268.       (dest @default-dest)
  269.    )
  270.  
  271.    (makedir "fonts:Menu")
  272.    (copyfiles
  273.       (prompt "")
  274.       (help @copyfiles-help)
  275.       (source "Montage2:MMenu")
  276.       (dest "fonts:MMenu")
  277.       (all)
  278.    )
  279.    (copyfiles
  280.       (prompt "")
  281.       (help @copyfiles-help)
  282.       (source "Montage2:MMenu.font")
  283.       (dest "fonts:")
  284.    )
  285.  
  286.    (working "Copying default startup sequence...")
  287.  
  288.    (copyfiles
  289.       (prompt "")
  290.       (help @copyfiles-help)
  291.       (source "Montage2:startup_seq")
  292.       (dest (tackon @default-dest "Montage!/MTSEQ"))
  293.       (all)
  294.    )
  295.    (copyfiles
  296.       (prompt "")
  297.       (help @copyfiles-help)
  298.       (source (tackon @default-dest "Montage!/MTSEQ/startup_seq.PG.001"))
  299.       (dest (tackon @default-dest "Montage!/MTSEQ"))
  300.       (newname "default.PG.001")
  301.    )
  302.    (copyfiles
  303.       (prompt "")
  304.       (help @copyfiles-help)
  305.       (source (tackon @default-dest "Montage!/MTSEQ/startup_seq.PG.color"))
  306.       (dest (tackon @default-dest "Montage!/MTSEQ"))
  307.       (newname "default.PG.color")
  308.    )
  309.    (copyfiles
  310.       (prompt "")
  311.       (help @copyfiles-help)
  312.       (source (tackon @default-dest "Montage!/MTSEQ/startup_seq.PG.preset"))
  313.       (dest (tackon @default-dest "Montage!/MTSEQ"))
  314.       (newname "default.PG.preset")
  315.    )
  316.    (copyfiles
  317.       (prompt "")
  318.       (help @copyfiles-help)
  319.       (source (tackon @default-dest "Montage!/MTSEQ/startup_seq.PG.color1"))
  320.       (dest (tackon @default-dest "Montage!/MTSEQ"))
  321.       (newname "default.PG.color1")
  322.    )
  323.    (copyfiles
  324.       (prompt "")
  325.       (help @copyfiles-help)
  326.       (source (tackon @default-dest "Montage!/MTSEQ/startup_seq.PG.001.stamp"))
  327.       (dest (tackon @default-dest "Montage!/MTSEQ"))
  328.       (newname "default.PG.001.stamp")
  329.    )
  330.  
  331.    (working "Copying default startup sequence...")
  332.  
  333.    (copyfiles
  334.       (prompt "")
  335.       (help @copyfiles-help)
  336.       (source "Montage2:Examples")
  337.       (dest (tackon @default-dest "Montage!/MTSEQ"))
  338.       (all)
  339.    )
  340.  
  341.    ;----------------------------------------------------------
  342.    ; Prompt for Disk 3.
  343.  
  344.    (askdisk
  345.       (prompt "Please insert Montage Program Disk 3:")
  346.       (help "")
  347.       (dest "Montage3")
  348.    )
  349.  
  350.    (working "Installing Montage Fonts....")
  351.  
  352.    (copyfiles
  353.       (prompt "")
  354.       (help @copyfiles-help)
  355.       (source "Montage3:fonts")
  356.       (dest (tackon @default-dest "Montage!/MTFONTS"))
  357.       (all)
  358.    )
  359.  
  360.    ;----------------------------------------------------------
  361.    ; Prompt for Disk 4.
  362.  
  363.    (askdisk
  364.       (prompt "Please insert Montage Program Disk 4:")
  365.       (help "")
  366.       (dest "Montage4")
  367.    )
  368.  
  369.    (copyfiles
  370.       (prompt "")
  371.       (help @copyfiles-help)
  372.       (source "Montage4:fonts")
  373.       (dest (tackon @default-dest "Montage!/MTFONTS"))
  374.       (all)
  375.    )
  376.  
  377.    ;----------------------------------------------------------
  378.    ; Prompt for Disk 5.
  379.  
  380.    (askdisk
  381.       (prompt "Please insert Montage Program Disk 5:")
  382.       (help "")
  383.       (dest "Montage5")
  384.    )
  385.  
  386.    (copyfiles
  387.       (prompt "")
  388.       (help @copyfiles-help)
  389.       (source "Montage5:fonts")
  390.       (dest (tackon @default-dest "Montage!/MTFONTS"))
  391.       (all)
  392.    )
  393.  
  394.    (working "Installing required libraries....")
  395.  
  396.    (copyfiles
  397.       (prompt "")
  398.       (help @copyfiles-help)
  399.       (source "Montage5:file_interface/kd_freq.library")
  400.       (dest "LIBS:")
  401.    )
  402.  
  403.    (working "Installing Tutorial files....")
  404.  
  405.    (copyfiles
  406.       (prompt "")
  407.       (help @copyfiles-help)
  408.       (source "Montage5:Tutorial")
  409.       (pattern "Tutorial.PG#?")
  410.       (dest (tackon @default-dest "Montage!/MTSEQ"))
  411.    )
  412.  
  413.    (copyfiles
  414.       (prompt "")
  415.       (help @copyfiles-help)
  416.       (source "Montage5:Tutorial")
  417.       (pattern "#?.IFF#?")
  418.       (dest iff_dir)
  419.    )
  420.  
  421.    ;----------------------------------------------------------
  422.    ; Prompt for Disk 6.
  423.  
  424.    (askdisk
  425.       (prompt "Please insert Montage Program Disk 6:")
  426.       (help "")
  427.       (dest "Montage6")
  428.    )
  429.  
  430.    (copyfiles
  431.       (prompt "")
  432.       (help @copyfiles-help)
  433.       (source "Montage6:")
  434.       (pattern "Tutorial#?.IFF#?")
  435.       (dest iff_dir)
  436.    )
  437.  
  438.    (set autoMount
  439.       (askbool
  440.          (prompt "Should Montage run automatically upon bootup?\n"
  441.                  "For most systems, select NO.                 \n\n" 
  442.                  "Select YES only if Video Toaster starts automatically\n"
  443.                  "whenever you power-up your computer.                 \n")
  444.          (help "\n\nIf you would like, a command will be inserted"
  445.                "\ninto your \"S:Startup-Sequence\" file to"
  446.                "\nautomatically start Montage upon bootup.\n")
  447.          (default 0)
  448.       )
  449.    )
  450.  
  451.    (if autoMount
  452.       ((protect "S:Startup-Sequence" "rwed" )
  453.          (startup "Montage-Boot"
  454.             (prompt "Inserting Montage command into the startup-sequence\n")
  455.             (help "Montage will be launched whenever the system is booted.\n")
  456.             (command "CD MONTAGE:/")
  457.             (command 'C:NEWCLI "CON:0/0/640/12/MONTAGE" FROM MONTAGE.BOOT')
  458. ;            (command @default-dest "/Montage")
  459.          )
  460.       )
  461.    )
  462.  
  463.    (message
  464.       "Remember to remove the last Montage disk from\n"
  465.       "the floppy drive after the installation and  \n"
  466.       "store it in a safe place.                    \n"
  467.       (help "\n\n   Click PROCEED to continue.\n   Click CANCEL to abort.\n")
  468.    )
  469. )
  470.